<html>
	<head>
		<title></title>
		<link rel="stylesheet" href="style.css">	
	</head>
	<body>
		<table>
			<tr>
				<td colspan="2" id="pageheader">
					health information system
				</td>
			</tr>
			<tr>
				<td id="mainnav">
					<div class="menuitem">location</div>
					<div class="menuitem">opd cases</div>
					<div class="menuitem">health promotion</div>
					<div class="menuitem">nutrition</div>
					<div class="menuitem">child welfare</div>
					<div class="menuitem"><a href = 'http://localhost/project/school_view.php'>family planning</a></div>
				</td>
				<td id="content">
					<div id="divPageMenu">
						<span class="menuitem" >sub districts</span>
						<span class="menuitem" >communities</span>
						<span class="menuitem" >view map</span>
						<input type="text" id="txtSearch">
						<span class="menuitem">search</span>		
					</div>
					<div id="divStatus" class="status">
						status message
					</div>
					<div id="divContent">
						Vaccines
						<table class="reportTable" width="100%" >
							<tr class="header" >
								<td>ID</td>
								<td>Vaccine Name</td>
								<td></td>
							</tr>
<?php	
	include("vaccines.php");
	$obj=new vaccines();
	if(!$obj->get_all_vaccines()){
		echo "error";
		exit();
	}
	
	$row=$obj->fetch();
	$row_counter=0;
	while($row){
		
		if($row_counter%2==0){
			$style=" class='row1' ";
		}else{
			$style=" class='row2'  ";
		}	
		$id=$row['vaccine_id'];
		echo "<tr $style >";
			echo "<td>$id</td>";
			echo "<td><a href='vaccine_detail.php?id=$id'>$row[vaccine_name]</a></td>";
			echo "<td><a href='vaccine_edit.php?id=$id'>edit<a></td>";
		echo "</tr>";
		$row=$obj->fetch();
		$row_counter++;
	}
?>
						</table>
					</div>
				</td>
			</tr>
		</table>	
	</body>
</html>	